
// Weighting the Evidence: A Rank-Dependnet Model of Outdoor Recreation, June 2024
// This file uses data from MRIP to generate catch-per-trip and catch-at-length distributions for summer flounder in 2021

use MRIP_data.dta, clear //data from MRIP data request on catch-per-trip for the different species and years
keep if year==2021
drop year
keep if species=="summerflounder"
keep tot_cat n_trips se1
outsheet using "FlukeCatchPerTrip2021.txt", replace 


use MRIP_data2.dta, clear //data from MRIP data request on catch-at-length for the different species and years
keep if year==2021
drop year
keep if species=="summerflounder"
collapse(sum) tot_cat, by (length_inches)
drop if mi(length_inches)
egen total_catch=sum(tot_cat)
gen p=tot_cat/total_catch
keep length_inches p
outsheet using "ProbFlukeSizes2021.txt", replace 
